Web Services for Remote Management  14.0
Reference documentation for web service interfaces to support remote management of Symantec Endpoint Protection
List of all members | Static Public Member Functions | Static Public Attributes | Static Package Functions
com.symantec.sepm.webservice.client.command.CommandServiceHelper Class Reference

Provides helper functionality for the CommandService API. More...

Static Public Member Functions

static CommandTO createCommandTO (String commandName, String sourceHostIP, String groupName, ResourceBundleService resourceBundle, AdministratorTO administratorTO, String siteId, long usn, long timeLimit, String extraParamsInXml, RestartOptions restartOptions)
 Creates a transfer object for the specified command The timeLimit parameter is ignored if the specified command does not take timeLimit as a parameter. More...
 
static RestartOptionsTO createRestartOptionsTO (RestartOptions restartOptions)
 Creates a transfer object for the restart(reboot) options and transfer all information from web-service object to transfer object. More...
 
static ClientCommandStatusTO createClientCommandStatusTO (long usn)
 Creates a transfer object for the status of a specified client command The command is first set to stateId = 0 (initial). More...
 
static void validate (String webMethodInfo, String commandName, String[] computerGUIDList, long timeLimit) throws InvalidArgumentServiceException, InvalidArgumentException
 Validates input parameters for the methods of the CommandService API. More...
 
static void validatePowerEraserCommand (PowerEraserCommand command, ClientManager clientManager) throws InvalidArgumentServiceException
 Validates the PowerEraserCommand details. More...
 
static String convertRemediatePayloadToParamXML (RemediateActionPayload remediatePayload)
 Converts given RemediateActionPayload object into parameter list XML file. More...
 
static void validateEvidenceOfCompromiseCommand (EvidenceOfCompromiseCommand command, String eocSchema, Integer commandResultMaxFileSize, Integer evidenceOfCompromiseAllowedFileSize) throws InvalidArgumentServiceException
 Validates the EvidenceOfCompromiseCommand details. More...
 
static void validateQuarantineCommand (QuarantineCommand command) throws InvalidArgumentServiceException
 Validates the QuarantineCommand details. More...
 
static ClientCommandStatusFilterTO createClientCmdStatusFilterTO ()
 Creates a transfer object to provide filter options for the status of a specified command. More...
 
static CommandStatusDetailResult createCmdStatusDetailResult (List< ClientCommandStatusTO > clientCommandStatusList, PagingOptionsTO pagingOptionsTO, Context context, Long totalStatusCount) throws ServiceException
 Creates a CommandStatusDetailResult object. More...
 

Static Public Attributes

static final Vector< String > VALID_COMMANDS_TYPE_SCAN = new Vector<String>()
 
static final Vector< String > VALID_COMMANDS_TYPE_UPDATE_CONTENT_SCAN = new Vector<String>()
 

Static Package Functions

 [static initializer]
 

Detailed Description

Provides helper functionality for the CommandService API.

This class validates input parameters and populates transfer objects and filter objects. Additional validation is provided by other classes.

See also
GroupNameValidator
GUIDValidator See also the other classes in the validation package.

Member Function Documentation

com.symantec.sepm.webservice.client.command.CommandServiceHelper.[static initializer] ( )
staticpackage
static CommandTO com.symantec.sepm.webservice.client.command.CommandServiceHelper.createCommandTO ( String  commandName,
String  sourceHostIP,
String  groupName,
ResourceBundleService  resourceBundle,
AdministratorTO  administratorTO,
String  siteId,
long  usn,
long  timeLimit,
String  extraParamsInXml,
RestartOptions  restartOptions 
)
static

Creates a transfer object for the specified command The timeLimit parameter is ignored if the specified command does not take timeLimit as a parameter.

In this case, pass any value.

For information about Symantec Endpoint Protection Manager sites, see the product documentation.

Parameters
commandNamecommand name
sourceHostIPstring that specifies the IP address of the command source
groupNamegroup name if available
resourceBundleresource bundle
administratorTOtransfer object for the administrator issuing the command
siteIdthe Symantec Endpoint Protection Manager Site ID
usnunique sequence number
timeLimitlong value that specifies the time limit in minutes after which a protection technology is re-enabled if the command disabled the technology
extraParamsInXmlAdditional command parameter object
restartOptionsRestart option information details.
Returns
the Command transfer object
static RestartOptionsTO com.symantec.sepm.webservice.client.command.CommandServiceHelper.createRestartOptionsTO ( RestartOptions  restartOptions)
static

Creates a transfer object for the restart(reboot) options and transfer all information from web-service object to transfer object.

Parameters
commandRestartOptionsrestart(reboot) options details object as provided by the user
Returns
a RestartOptionsTO transfer object that is then populated with the command
static ClientCommandStatusTO com.symantec.sepm.webservice.client.command.CommandServiceHelper.createClientCommandStatusTO ( long  usn)
static

Creates a transfer object for the status of a specified client command The command is first set to stateId = 0 (initial).

See also
CommandStatusDetail::getStateId.
Parameters
usnunique sequence number
Returns
a ClientCommandStatus transfer object that is then populated with the command name
static void com.symantec.sepm.webservice.client.command.CommandServiceHelper.validate ( String  webMethodInfo,
String  commandName,
String[]  computerGUIDList,
long  timeLimit 
) throws InvalidArgumentServiceException, InvalidArgumentException
static

Validates input parameters for the methods of the CommandService API.

Parameters
webMethodInfoweb method that initiated the validation request
commandNamecommand name
computerGUIDListlist of client computers on which to run the command
timeLimittime limit in minutes
Exceptions
InvalidArgumentServiceExceptionif the client supplied invalid parameters
static void com.symantec.sepm.webservice.client.command.CommandServiceHelper.validatePowerEraserCommand ( PowerEraserCommand  command,
ClientManager  clientManager 
) throws InvalidArgumentServiceException
static

Validates the PowerEraserCommand details.

Throws exception if any of the following is true

  • Command is null
  • CommandType is null or empty
  • Target Object type or object id is null or empty
  • Target object type is not computer or group
  • Restart options cannot be null if the PowerEraserCommand type is 'ScanWithRootkit'
Parameters
commandPowerEraserCommand object
clientManagerClientManager object
Exceptions
InvalidArgumentServiceException,incase of validation failed
static String com.symantec.sepm.webservice.client.command.CommandServiceHelper.convertRemediatePayloadToParamXML ( RemediateActionPayload  remediatePayload)
static

Converts given RemediateActionPayload object into parameter list XML file.

Parameters
remediatePayloadRemediateActionPayload which contains scanGUID and filePath
Returns
String value - Parameter list in XML format.
static void com.symantec.sepm.webservice.client.command.CommandServiceHelper.validateEvidenceOfCompromiseCommand ( EvidenceOfCompromiseCommand  command,
String  eocSchema,
Integer  commandResultMaxFileSize,
Integer  evidenceOfCompromiseAllowedFileSize 
) throws InvalidArgumentServiceException
static

Validates the EvidenceOfCompromiseCommand details.

Throws exception if any of the following is true

  • Command is null
  • InputEoCDataXML is empty
  • InputEoCDataXML does not confirm with the EoC Schema
  • Target Object type or object id is null or empty
  • Target object type is not computer or group
Parameters
commandEvidence of Compromise command object
eocSchemaEOC schema (eoc.xsd) file content in String format
Exceptions
InvalidArgumentServiceException
static void com.symantec.sepm.webservice.client.command.CommandServiceHelper.validateQuarantineCommand ( QuarantineCommand  command) throws InvalidArgumentServiceException
static

Validates the QuarantineCommand details.

Throws exception if any of the following is true

  • Command is null
  • CommandType is null or empty
  • Target Object type or object id is null or empty
  • Target object type is not computer or group
Parameters
command
Exceptions
InvalidArgumentServiceException
static ClientCommandStatusFilterTO com.symantec.sepm.webservice.client.command.CommandServiceHelper.createClientCmdStatusFilterTO ( )
static

Creates a transfer object to provide filter options for the status of a specified command.

See also
PagingOptions
Returns
a ClientCommandStatusFilter transfer object that is then populated with the parameters that are passed to the methods of the CommandService API
See also
Context The command status and command status detail are set to a default value of Any to retrieve the command status of all clients by default.

The pageSize is incremented by 1 before it is set on the filter object, to return an extra row.

static CommandStatusDetailResult com.symantec.sepm.webservice.client.command.CommandServiceHelper.createCmdStatusDetailResult ( List< ClientCommandStatusTO >  clientCommandStatusList,
PagingOptionsTO  pagingOptionsTO,
Context  context,
Long  totalStatusCount 
) throws ServiceException
static

Creates a CommandStatusDetailResult object.

Parameters
clientCommandStatusListlist of details about the status of the command that was run on the specified clients
pagingOptionsTOtransfer object that contains pagination information for returned result sets.
contextobject that provides the starting index for multiple sets of results
totalStatusCountthe total number of results available in the returned CommandStatusDetailResult object
Returns
a CommandStatusDetailResult transfer object that is then populated with the results that are returned from the ClientCommandStatus transfer object
Exceptions
ServiceExceptionif more results are returned than are accounted for by the pagingOptionsTO parameter and the context parameter

Member Data Documentation

final Vector<String> com.symantec.sepm.webservice.client.command.CommandServiceHelper.VALID_COMMANDS_TYPE_SCAN = new Vector<String>()
static
final Vector<String> com.symantec.sepm.webservice.client.command.CommandServiceHelper.VALID_COMMANDS_TYPE_UPDATE_CONTENT_SCAN = new Vector<String>()
static